using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace WebDauGia.Domain.Models.Mapping
{
    public class PhuongThucGiaoHangMap : EntityTypeConfiguration<PhuongThucGiaoHang>
    {
        public PhuongThucGiaoHangMap()
        {
            // Primary Key
            this.HasKey(t => t.id);

            // Properties
            this.Property(t => t.ten)
                .IsRequired()
                .HasMaxLength(100);

            // Table & Column Mappings
            this.ToTable("PhuongThucGiaoHang");
            this.Property(t => t.id).HasColumnName("id");
            this.Property(t => t.ten).HasColumnName("ten");
            this.Property(t => t.ghichu).HasColumnName("ghichu");
            this.Property(t => t.phi).HasColumnName("phi");
        }
    }
}
